#include <iostream>

using namespace std;

class Dragon {
    public:
        int hp;
        Dragon() {
            hp = 100;
            cout << "Dragon Constructor" << endl;
        }
        void Attack() { cout << "Attack" << endl; }

};

class RedDragon: virtual public Dragon {
    public:
        RedDragon () {
            cout << "RedDragon Constructor" << endl;
        }
        void FireAttack() {
            cout << "Fire attack" << endl;
        }
};


class BlueDragon: virtual public Dragon {
    public:
        BlueDragon () {
            cout << "BlueDragon Constructor" << endl;
        }
        void IceAttack() {
            cout << "Ice attack" << endl;
        }
};

class KingDragon: public RedDragon, public BlueDragon {
    public:
        KingDragon ()  {
            cout << "KingDragon Constructor" << endl;
        }
        void showHP() {
            cout << "HP:" << this->hp << endl;
        }
};


int main() {
    KingDragon a;
    a.showHP();
    a.Attack();
    a.FireAttack();
    a.IceAttack();

    return 0;
}
